import { baseUrlApi, requestClient, type Result } from '#/api/request';

export function getInnerchain(params?: any) {
  return requestClient.get<Result>(baseUrlApi('/portal/admin/innerchain'), {
    params,
  });
}

export function postInnerchain(data: any) {
  return requestClient.post<Result>(
    baseUrlApi(`/portal/admin/innerchain`),
    data,
  );
}

export function putInnerchain(data: any) {
  return requestClient.put<Result>(
    baseUrlApi(`/portal/admin/innerchain/${data.id}`),
    data,
  );
}

export function deleteInnerchain(id: number) {
  return requestClient.delete<Result>(
    baseUrlApi(`/portal/admin/innerchain/${id}`),
  );
}

export function postInnerchainStatus(data: any) {
  return requestClient.post<Result>(
    baseUrlApi(`/portal/admin/innerchain/status`),
    data,
  );
}
